package cn.funeralobjects.ams.service.impl;

import cn.funeralobjects.ams.repository.BaseAmsRepository;
import cn.funeralobjects.common.jpa.service.JpaCodeService;
import cn.funeralobjects.common.jpa.service.JpaEntityService;
import cn.funeralobjects.common.jpa.service.JpaModifyService;
import cn.funeralobjects.common.repository.CodeRepository;
import cn.funeralobjects.common.repository.EntityRepository;
import org.springframework.data.repository.CrudRepository;

/**
 * @author FuneralObjects
 * Create date: 2020/5/25 2:51 PM
 */
public interface BaseJpaAmsService<Modify, Entity, ID> extends
        JpaModifyService<Modify, Entity, ID>,
        JpaCodeService<Entity, ID>,
        JpaEntityService<Entity, ID> {

    /**
     * baseAmsRepository
     *
     * @return baseAmsRepository
     */
    BaseAmsRepository<Entity, ID> baseAmsRepository();

    /**
     * codeRepository
     *
     * @return baseAmsRepository
     */
    @Override
    default CodeRepository<Entity, ID> codeRepository() {
        return baseAmsRepository();
    }

    /**
     * entityRepository
     *
     * @return baseAmsRepository
     */
    @Override
    default EntityRepository<Entity, ID> entityRepository() {
        return baseAmsRepository();
    }

    /**
     * modifyRepository
     *
     * @return baseAmsRepository
     */
    @Override
    default CrudRepository<Entity, ID> modifyRepository() {
        return baseAmsRepository();
    }

}
